package html.totext;

import java.io.File;

import org.jsoup.Jsoup;

import utils.MyUtils;

public class Html2TextJsoup {

	public static String html2text(String html) {
		return Jsoup.parse(html).text();
	}

	public static void main(String[] args) {
		try {
			String html = MyUtils
					.readFileToString(new File(
							"/home/gmarcone/Descargas/removing-html-from-a-java-string.html"));

			System.out.println(html2text(html));
		} catch (Exception e) {
			e.printStackTrace(System.out);
		}
	}

}
